Apr 16, 2007, 06:59 AM // 06:59
|
#1
|
Krytan Explorer
Join Date: Feb 2007
Guild: Ridirian Guides
Profession: W/Me
|
A simple python SR Nerf Test Model
Below I am submitting a simple model for testing the SR Nerf. You will need at least python 2.2 to run it. It may be too simplified but it does give a feel for the effects.
Code:
import random
# Simple class definition
class Spell(object):
__slots__=('name', 'cost', 'cast', 'recharge', 'left')
def __init__(self, name, cost, cast, recharge, left=0):
self.name = name
self.cost = cost
self.cast = cast
self.recharge = recharge
self.left = left
def model(spells,
energyMax=55,
every=5,
reapingMax=13,
reapingAmt=13,
noMonsters=8,
noSpirits=2,
deathsStart=10,
deathsEnd=35):
'''
This runs the model based on the parameters passed in. Only
spells is required, the others are named parameters for convenience.
'''
lastDeath=0 # starting last death
deaths = [] # list of death pairs (when, reapValue)
# set up the no of monsters in the sample for the SR value
for n in range(noMonsters):
death = random.randint(deathsStart, deathsEnd)
if death > lastDeath: lastDeath = death
deaths.append([death, reapingAmt])
# set up the no of spirits in the sample for the SR value
for n in range(noSpirits):
death = random.randint(deathsStart, deathsEnd)
if death > lastDeath: lastDeath = death
deaths.append([death, reapingAmt / 2])
#sort the list for the print
deaths.sort()
print deaths
energy = energyMax
casting = 0
reaping = 0
#recharge on 4 pips is about 0.7 to 0.8
recharge = 0.8
battery = 0
for second in range(lastDeath):
for spell in spells:
if spell.left > 0: # if the spell is still recharging
spell.left -= 1
elif casting == 0: # if not in the process of casting
if spell.cost <= energy: # if there is enough energy to cast
print "%3d %-20s %2d %2d %2d %d" % (second, spell.name, spell.cost, spell.cast, energy, casting)
casting = spell.cast # HCT could be applied here
energy -= spell.cost
spell.left = spell.recharge # HSR could be applied here
if casting > 0:
casting -= 1
# recharge is not 1 pip a second
battery += recharge
if energy < max and battery > 1.0:
energy += 1
if battery > 1.0:
battery -= 1.0
# get the Soul Reaping for the monsters that died
for death in deaths:
if death[0] == second:
if reaping < reapingMax:
reaping += death[1]
if reaping > reapingMax:
reaping = reapingMax
# apply the SR value based on parameters
if second != 0 and second % every == 0:
x = energy + reaping
reaping = 0
if x > max:
energy = energyMax
else:
energy = x
# SAMPLE SPELL LIST
spells = [Spell('Insidious',15,1,12),
Spell('Suffering',15,1,5),
Spell('Spiteful',10,2,10),
Spell('Desecrate',10,2,15),
Spell('Defile',10,2,15),
Spell('Parasitic',5,1,2)]
#first test as per default values
random.seed(0)
model(spells)
#second test taking out the maxing and reaping every second
# kind of like how it used to be
spells[2] = Spell('Spiteful',15,2,10)
random.seed(0)
model(spells, reapingMax=55, every=1, noSpirits=1)
# the spirits dying exploit
random.seed(0)
model(spells, reapingMax=55, every=1, noSpirits=12)
EDIT: Damn it loses the indents : placed the code in tags
Last edited by VinnyRidira; Apr 16, 2007 at 02:17 PM // 14:17..
|
|
|
Apr 16, 2007, 07:28 AM // 07:28
|
#2
|
Academy Page
Join Date: Sep 2005
Location: Belgium
Guild: The Blitzers Guild
|
im not 100% sure this shows anything
while i do find it nice you try such things, though.
this script, probably not holds the 100% truth, i mean if it really was a good 100% impression of guildwars then it would be good, but its what you think of it, you dont know the algoritms and the code behind guildwars itself though.
its a nice try.
not 100% represetable though.
|
|
|
Apr 16, 2007, 07:30 AM // 07:30
|
#3
|
Forge Runner
Join Date: May 2005
Guild: The Etereal Guard
Profession: Me/Mo
|
comment your code...ugh...
|
|
|
Apr 16, 2007, 09:02 AM // 09:02
|
#4
|
Krytan Explorer
Join Date: Feb 2007
Guild: Ridirian Guides
Profession: W/Me
|
Pity about the indentation, and as I said a simplified model. Feel free to embellish it. It does not take into account HSR and HCT or energy management spells like SoLS or GoLE, which are now kinda prereqs in the necro spell set. Pity they did not give armour buffs to compensate for the leech costs. Still the more I think about it, the more I am sure the nerf is too punishing and unfair. Poorly thought out fix for a serious problem.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 05:29 PM // 17:29.
|